export interface IUser {
  _id: string
  email: string
  name: string
  accessLevel: 'usual' | 'admin'
}

export interface ILogin {
  email: string
  password: string
}

export interface IUserUpdate {
  email: string
  name: string
}

export interface IRegister {
  email: string
  name: string
  password: string
}

export interface IToken {
  token: string
}

export interface IMainApiAuth {
  readonly baseUrl: string
  readonly headers: Object
  checkToken(token: string): Promise<any>
  signup(registerData: IRegister): Promise<any>
  signin(loginData: ILogin): Promise<any>
}

export interface IMainApi {
  getUserInfo(): Promise<any>
  setUserInfo(updateUserData: IUserUpdate): Promise<any>
}
